Skip to content
This repository was archived by the owner on Mar 12, 2024. It is now read-only.

Block parameters #3

Merged
merged 13 commits into from
Mar 24, 2016
Merged

Block parameters #3

merged 13 commits into from
Mar 24, 2016

Conversation

omghax
Copy link
Contributor

@omghax omghax commented May 21, 2015

This PR removes usage of parentView in the various components, as suggested in emberjs/ember.js#11170. ivy-tabs and ivy-tab-list now yield themselves as a block parameter, which you then pass to their children.

Here's an example:

{{#ivy-tabs as |tabs|}}
  {{#ivy-tab-list ivy-tabs=tabs as |list|}}
    {{#ivy-tab ivy-tab-list=list}}Tab 1{{/ivy-tab}}
    ...
  {{/ivy-tab-list}}

  {{#ivy-tab-panel ivy-tabs=tabs}}Panel 1{{/ivy-tab-panel}}
  ...
{{/ivy-tabs}}

Once Ember supports scoped HTMLBars helpers, this could be shortened to:

{{#ivy-tabs as |tabs|}}
  {{#tabs.ivy-tab-list as |list|}}
    {{#list.ivy-tab}}Tab 1{{/list.ivy-tab}}
    ...
  {{/tabs.ivy-tabs}}

  {{#tabs.ivy-tab-panel}}Panel 1{{/tabs.ivy-tab-panel}}
  ...
{{/ivy-tabs}}

@omghax
Copy link
Contributor Author

omghax commented May 26, 2015

Due to the Ember core team's decision not to deprecate parentView until scoped htmlbars helpers land, this PR will likely not be merged. Rather, we can continue using ivy-tabs as it currently exists until I can switch it to use the scoped syntax and release a 2.0 version.

omghax added 10 commits March 23, 2016 20:01
This was only being used by the (now removed) standalone builds.
The `parentView` property is slated to be removed, and doesn't appear to
work properly in Ember 1.13. This change fixes that. Ideally we'll be
able to use Ember 2.3's contextual components feature to make this even
nicer.
@omghax omghax force-pushed the block-parameters branch from eac8424 to 72ffcfa Compare March 24, 2016 17:31
@omghax omghax merged commit 504297e into master Mar 24, 2016
@omghax omghax deleted the block-parameters branch March 24, 2016 18:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant